<%@page contentType="text/html" pageEncoding="UTF-8" trimDirectiveWhitespaces="true"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="contextPath" value="${pageContext.servletContext.contextPath}"/>
<!DOCTYPE">

<html lang="nl">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Pizza Luigi - pizza's</title>


<link rel="stylesheet" href="${contextPath}/styles/default.css"/> 

</head>
<body>
	<c:import url="/WEB-INF/JSP/menu.jsp"/>

	<h1>Onze pizza's</h1>
    <ul class="zebra">
    <c:forEach var="pizza" items="${pizzas}" varStatus="status">
    	<li class="${status.count % 2 == 0 ? 'even':'oneven'}">${pizza.nummer}: 
    		<c:out value="${pizza.naam}"/> ${pizza.prijs}&euro;
		  	${pizza.pikant ? "pikant" : "niet pikant"}

				<c:url value="/pizzas/detail.htm" var="detailURL">
					<c:param name="nummer" value="${pizza.nummer}"/>
					
				</c:url>
				<a href="<c:out value='${detailURL}'/>">Detail</a> 
				<c:if test="${pizzaNummersMetFoto.contains(pizza.nummer)}">
					  <c:url value="/pizzafotos/${pizza.nummer}.jpg" var="fotoURL"/>
					  <a href="${fotoURL}">Foto</a>
				</c:if>
		</li>
    </c:forEach>
    </ul>
 </body>
</html>